package homework.work5;

public class Main5 {
    public static void main(String[] args) {
        //1.
        SouthPerson per01 = new SouthPerson();
        NorthPerson per02 = new NorthPerson();
        test(per01,per02);

        //2.
        Person per03 = new SouthPerson();
        SouthPerson per04=(SouthPerson)per03;
        per04.swim();
        System.out.println(per04.salary);
    }

    public static void test(SouthPerson per01,NorthPerson per02){
        per01.eat();
        per02.eat();
    }
}
